package com.sleepless.my.io.response;

import lombok.Data;
import org.springframework.data.domain.Page;

@Data
public class PageInfo<T> {
    private int totalPages;
    private long totalElements;

    public PageInfo(Page<T> page) {
        this.totalPages = page.getTotalPages();
        this.totalElements = page.getTotalElements();
    }
}
